/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 故我
 * Date: 2023-05-06
 * Time: 22:23
 */

class PetDog{
    public String name;
    public String color;

    public void barks(){
        System.out.println("汪汪");
    }
    public void wag(){
        System.out.println(name + color + "摇尾巴");
    }
}
public class Testdemo1 {
    public static void main(String[] args) {
        PetDog dog1 = new PetDog();
        dog1.name = "白白";
        dog1.color = "黄";
        dog1.wag();
        dog1.barks();

        PetDog dog2 = new PetDog();
        dog2.name = "鸡鸡";
        dog2.color = "白";
        dog2.wag();
        dog2.barks();
    }

}
